<include file="Public/ADMIN/HTML/Admin_header/admin_first_head.html" />
<title>已审核项目{$Think.const.TITLE}</title>
<include file="Public/ADMIN/HTML/Admin_header/admin_css_and_js.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_title.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_middle_list.html" />
<include file="Public/ADMIN/HTML/Left_list/project_left_list.html" />
<!-- DataTables Example -->
<script>
function projectDel(xid){ 
		var gradename = xid;
		address = "{$Think.const.DOMAIN_NAME}Admin/Project/projectDel/id/"+gradename; // 设置$.get调用路径
		var delTr = document.getElementById(xid);                                  // 获取动态的表格ID
		$.get(address,function(str){                                               // 方法不太明白，大概意思是获取$.get返回的值
			if(str==0){                                                            // 如果返回的时0的话就证明是对的
			ZENG.msgbox.show("删除成功！", 4, 1000);
			delTr.parentNode.removeChild(delTr);                                   // 删除该行
		}else{                                                                     // 其他情况都是原密码错误    
			ZENG.msgbox.show("删除失败！", 5, 2000);
		}
	    });	 
	}
	
	
    function project_success(id,project_not_through_id){ 
	        name = document.getElementById(project_not_through_id).className;
			switch (name){
				case "label label-warning":
				    address = "{$Think.const.DOMAIN_NAME}Admin/Project/showList_project_success/id/"+id+"/type/0";
					$.get(address,function(str){
						 switch(str){
						 	case "0":
							    ZENG.msgbox.show("操作成功！", 4, 1000);  
						        document.getElementById(project_not_through_id).className = 'label label-success'; 
			       		        document.getElementById(project_not_through_id).innerHTML = '审核通过';
							  break;
							case "1":
						      ZENG.msgbox.show("操作失败！", 5, 1000);
							  break;
						 }
						 
					});
				    break;
				case "label label-success":
				    address = "{$Think.const.DOMAIN_NAME}Admin/Project/showList_project_success/id/"+id+"/type/1";
					$.get(address,function(str){
						 switch (str){
						 	case "0":
							    ZENG.msgbox.show("操作成功！", 4, 1000);  
								document.getElementById(project_not_through_id).className = 'label label-warning'; 
				       		 	document.getElementById(project_not_through_id).innerHTML = '审核未通过';
							  break;
							case "1":
							     ZENG.msgbox.show("操作失败！", 5, 1000);
							  break;
						 }
						 	
						 
					});
				    break;
			}
			
	}
	
</script>

    <style type="text/css">

 /*   .select{
		height: 1.3em;
		width: 1.6em;
		font-size: 2px;
	}*/
          .p{
            height:100px;
            width: 50%;
            position: absolute;
            left: 30%;
          }
              .pages a,  
            .pages span {  
                display: inline-block;  
                padding: 2px 5px;  
                margin: 2 3px;  
                border: 1px solid #f0f0f0;  
                -webkit-border-radius: 3px;  
                -moz-border-radius: 3px;  
                border-radius: 3px;  
            }  
              
            .pages a,  
            .pages li {  
                display: inline-block;  
                list-style: none;  
                text-decoration: none;  
                color: #58A0D3;  
            }  
              
            .pages a.first,  
            .pages a.prev,  
            .pages a.next,  
            .pages a.end {  
                margin:0;  
            }  
              
            .pages a:hover {  
                border-color: #50A8E6;  
            }  
              
            .pages span.current {  
                background: #50A8E6;  
                color: #FFF;  
                font-weight: 700;  
                border-color: #50A8E6;  
            }  
          </style>     
<div class="row" style="height: 80%">
	<div class="col-lg-10" style="float: right">
		<div class="widget-container fluid-height clearfix">
			<div class="heading">
				<i class="icon-table"></i>已审核项目
			</div>
			  <form method="post" action="__SELF__">
             <input type="text" name="name" placeholder="           项目名称 ||   负责人  " align="center" style="margin-left: 56.3%;height: 40px; width:35%;border-radius: 10px;">
              <input type="submit" class="btn btn-primary" style="height:40px;"; >
            </form>
			<div class="widget-content padded clearfix">
				<table class="table table-bordered table-striped dataTable"
					id="datatable-editable">
					<thead>
						<th style="width: 6%; text-align: center">编号</th>
						<th style="width: 18%; text-align: center">项目名称</th>
						
						<th style="width: 7%; text-align: center;">负责人</th>
						<th style="width: 18%; text-align: center">项目参与者</th>
						<th style="width: 7%; text-align: center;">当前状态</th>
						<th style="width: 7%; text-align: center">是否招标</th>
						<th style="width: 14%; text-align: center;">添加时间</th>
						<!-- <th style="width: 8%; text-align: center">申报附件</th>
						<th style="width: 8%; text-align: center">结项附件</th> -->
						<th style="width: 7%; text-align: center;">发布人</th>
						<th style="width: 6%; text-align: center;">操作</th>
					</thead>
					<tbody>
						<assign name="number" value="1" />
						<assign name="project_not_through_id" value="100000" />
						<volist name="through" id="vo">
						<tr id="{$vo.id}">
							<td style="text-align: center;">{$number++}</td>
							<td><a
								href="{$Think.const.DOMAIN_NAME}Home/Project/details/id/{$vo.id}"
								target="_bank" title= <if condition="($vo.joinusers eq null) "> 暂无项目成员
											
											<else /> {$vo.joinusers}
											</if>>{$vo.name}</a></td>
							<td style="text-align: center;">{$vo.leader}</td>
							<!-- <td style="text-align: center;">{$vo.joinusers}</td> -->
							<td style="text-align: center;"><if condition="($vo.joinusers eq null)"> 暂无项目成员
							<else/>{$vo.joinusers} </if></td>
							<td style="text-align: center;">
									
									<if condition="$vo.enddate neq null"> 
									    <span class="label label-danger">该项目已结项</span>
										 
										<else />
										 
										  <if condition="$vo.ischecked eq '2'"> 
										   <a href="javascript:void(0);" onclick="javascript:project_success({$vo.id},{$project_not_through_id})" >
										     	<span id="{$project_not_through_id++}" class="label label-warning">审核未通过</span>
											 </a>
										  </if>
										  <if condition="$vo.ischecked eq '1'"> 
										    <a href="javascript:void(0);" onclick="javascript:project_success({$vo.id},{$project_not_through_id})" >
										      <span id="{$project_not_through_id++}" class="label label-success">审核通过</span>
											  </a>
										  </if> 
										  
									</if>
									
									</td>
							<td style="text-align: center;"><if
									condition="$vo.isbid eq '1'"> <span
									class="label label-success">招标中</span></if> <if
									condition="$vo.isbid eq '2'"> <span
									class="label label-warning">停止招标</span></if> <if
									condition="$vo.isbid eq '0'"> <span
									class="label label-warning">不招标</span></if></td>
							<td style="text-align: center;">{$vo.adddate}</td>
							<!-- <td style="text-align: center;"><a
								href="{$Think.const.RESOURCES}UPLOADS/attach/{$vo.attach}"
								target="_bank">{$vo.attach|substr=###,20,15}</a></td>
							<td style="text-align: center;"><a
								href="{$Think.const.RESOURCES}UPLOADS/attach/{$vo.endattach}"
								target="_bank">{$vo.endattach|substr=###,20,15}</a></td> -->
							<td style="text-align: center;">{$vo.isuser}</td>
							<td style="text-align: center; width: 6%;">

								<!-- <div class="action-buttons" style="margin-left: -14%">
									<a style="    margin-left: 10%;" class="table-actions" href="javascript:void(0);"
										onclick="if(confirm('確定刪除么？')==0){ return false;}else{javascript:projectDel({$vo.id})}"
										title="删除"><i class="icon-trash"></i></a>

								</div> -->
								<div class="action-buttons" style="margin-left: -14%">
									<a style="    margin-left: 10%;" class="table-actions" href="javascript:void(0);"
										onclick="if(confirm('確定刪除么？')==0){ return false;}else{javascript:projectDel({$vo.id})}"
										title="删除"><i class="icon-trash"></i></a>
										<!-- <a style="    margin-left: 10%;" class="table-actions" href=""



										
										title="设置"><i class=" icon-legal"></i></a> -->
										<!-- <select class="select" title="考核">
										
											<option value="0">考核</option>

											<option value={$number++}>{$vo.joinusers}</option>
											
										</select> -->
										<!-- <select class="select" title="考核">
										
											<option value="0">考核</option>

											<option value={$number++}>

                                           <if condition="($vo.joinusers eq null) "> 暂无项目成员
											
											<else /> {$vo.joinusers}
											</if>
											</option>
											
										</select> -->
								</div>
							</td>
						</tr {$project_not_through_id++}>
						</volist>
					</tbody>
				</table>
			
			</div>
			<div class="p">
			<div class="pages" >
				{$page}
			</div>	
        </div>
		</div>
		
	</div>
</div>

<!-- end DataTables Example -->
</div>
</div>
</body>
</html>